{% extends "base.html" %}

{% block content %}
<div class="panel-heading">
	<!--<div class="panel-title">订单详情</div>-->
</div>
<div  class="panel-body table-responsive">
<table cellpadding="0" cellspacing="0" border="0" class="table table-bordered " id="example">
	<thead>
	<h4>订单编号:{{order.orderID}}<span>状态:{{order.status}}</span></h4>
	</thead>
	<tbody>

    {% if order %}
    <tr>
		<th class="info">订单编号</th>
		<th >{{order.orderID}}</th>

	</tr>
    <tr>
        <th>负责人</th>
        <th >{{order.saleman.name}}  {{order.saleman.jobNumber}}</th>

    </tr>
    <tr>
        <th>联系人</th>
        <th >{{order.client.name}} </th>
    </tr>
    <tr>
        <th>联系人电话</th>
        <th >{{order.client.phone}}</th>
    </tr>
    <tr>
        <th>预约时间</th>
        <th >{{order.orderTime}}</th>
    </tr>
    {% if order.signTime %}
    <tr>
        <th>签约时间</th>
        <th >{{order.signTime}}</th>
    </tr>
    {% endif %}
    <tr>
        <th>宴会性质</th>
        <th >{{order.party_nature}}</th>
    </tr>
    <tr>
        <th>主角1</th>
        <th >{{order.role1}}</th>
    </tr>

    {% if order.role2 %}
    <tr>
        <th>主角2</th>
        <th >{{order.role2}}</th>
    </tr>
    {% endif %}
    {% if order.weddingAddress %}
    <tr>
        <th>宴会地址</th>
        <th >{{order.weddingAddress}}</th>
    </tr>
    {% endif %}

    {% if order.weddingTime %}
    <tr>
        <th>宴会时间</th>
        <th >{{order.weddingTime}}</th>
    </tr>
    {% endif %}

    {% if order.answerDoorAddress %}
    <tr>
        <th>回门地址</th>
        <th >{{order.answerDoorAddress}}</th>
    </tr>
    {% endif %}
    {% if order.answerDoorTime %}
    <tr>
        <th>回门时间</th>
        <th >{{order.answerDoorTime}}</th>
    </tr>
    {% endif %}



    {% if order.theme %}
    <tr>
        <th>主题</th>
        <th >{{order.theme}}</th>
    </tr>
    {% endif %}

    {% if order.hue %}
    <tr>
        <th>色调</th>
        <th >{{order.hue}}</th>
    </tr>
    {% endif %}

    {% if order.price %}
    <tr>
        <th>总价</th>
        <th >￥{{order.price}}</th>
    </tr>
    {% endif %}

    {% if order.advancePay %}
    <tr>
        <th>预付款</th>
        <th >￥{{order.advancePay}}</th>
    </tr>
    {% endif %}

    {% if order.finalPay %}
    <tr>
        <th>尾款</th>
        <th >￥{{order.finalPay}}</th>
    </tr>
    {% endif %}

    {% if order.backReason %}
    <tr>
        <th>退款原因</th>
        <th >{{order.backReason}}</th>
    </tr>
    {% endif %}

    {% if order.lessReason %}
    <tr>
        <th>未结款原因</th>
        <th >{{order.lessReason}}</th>
    </tr>
    {% endif %}

    {% if order.note %}
    <tr>
        <th>备注</th>
        <th >{{order.note}}</th>
    </tr>
    {% endif %}

    {% if order.lessReason %}
    <tr>
        <th>未结款原因</th>
        <th >{{order.lessReason}}</th>
    </tr>
    {% endif %}





    {% else %}
     <p>没有符合条件的订单</p>
    {% endif %}

	</tbody>
</table>
<table cellpadding="0" cellspacing="0" border="0" class="table table-bordered " id="example">
    <thead>
	<h4>所选项目</h4>
	</thead>
    <tbody>
    {% if item_list %}
	{% for item in item_list %}
		<tr class="odd gradeX">
		<td>{{item.name}}</td>

		</tr>
    {% endfor %}

   {% else %}
     <p>没有所选项目</p>
   {% endif %}
    </tbody>
</table>
</div>
{% endblock %}
